<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sports Center Member Management System</title>
<style>
.error {
	color: #ff0000;
	font-weight: bold;
}
</style>
</head>
<body>
	<br>게시판
	<br>

	<table border="1">
		<tr>
			<th>번호</th>
			<th>작성자</th>
			<th>아이디</th>
			<th>제목</th>
			<th>내용</th>
			<th>조회수</th>
			<th>작성날짜</th>
			<th>비고</th>
		</tr>
		<%-- <c:forEach items="${board }" var="board"> --%>
		<c:forEach begin="${(boardPage -1) * 10 }" end="${size - 1 }"
			var="count" step="1">
			<c:if test="${count - ((boardPage -1) * 10) < 10}">
				<tr>
					<td>${board[size - 1 - count].num }</td>
					<td>${board[size - 1 - count].name }</td>
					<td>${board[size - 1 - count].id }</td>
					<td>${board[size - 1 - count].subject }</td>
					<td>${board[size - 1 - count].content }</td>
					<td>${board[size - 1 - count].hit }</td>
					<td>${board[size - 1 - count].logTime }</td>
					<td>
						<form method="post" action="<c:url value="/board/content"/>">
							<input name="boardSeq" type="hidden"
								value="${board[size - 1 - count].boardSeq }" /> <input
								name="boardPage" type="hidden" value="${boardPage }" /> <input
								type="submit" value="보기" />
						</form>
					</td>
					<!--  <td><input type="submit" onclick="remove?memberName=${guest.name }" value="삭제" /></td>-->
					<!-- <td><a href="remove?memberName=${guest.name }">remove</a></td> -->

				</tr>
			</c:if>
		</c:forEach>
		<tr>
			<td colspan="8"><c:if test="${size < 10}">
					<a href="<c:url value="/board/?boardType=${boardType }&boardPage=1"/>">1 </a>
						.&nbsp;
					</c:if> <c:forEach begin="1" end="${size }" var="count">
					<c:if test="${count % 10 == 0 }">
						<a href="<c:url value="/board/?boardType=${boardType }&boardPage="/>
						<fmt:formatNumber value="${count / 10 }" pattern="" />">
							<fmt:formatNumber value="${count / 10 }" pattern="" />
						</a>
						.&nbsp;
						<c:if test="${(size - count < 10) && (size - count > 0)}">
							<a
								href="<c:url value="/board/?boardType=${boardType }&boardPage="/>
								<fmt:formatNumber value="${count / 10 + 1 }" pattern="" />">
								<fmt:formatNumber value="${count / 10 + 1 }" pattern="" />
							</a>
						.&nbsp;
						</c:if>
					</c:if>

				</c:forEach></td>
		</tr>

	</table>
</body>
</html>